﻿@model mtm.Core.Models.LogOnModel
@{ 
    /* Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich 
       To learn more about mytrip.mvc visit  
       http://mytripmvc.net  http://mytripmvc.codeplex.com 
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */ 
}
@{
    ViewBag.Title = Html.MytripPageTitle(CoreLanguage.logon);
    ViewBag.Keywords = mtm.Core.Settings.CoreSetting.HomePageKeyWords();
    ViewBag.Description = mtm.Core.Settings.CoreSetting.HomePageDesc();
}
@section scriptlink{
@Html.ScriptLink("jquery.validate.min.js,jquery.validate.unobtrusive.min.js,Page/Account.js")
}
@section content{
@Html.BreadCumps(">", CoreLanguage.logon)
<h1 class="title">@CoreLanguage.logon</h1>

@if (Model.unlockSiteId)
{
    <p>@CoreLanguage.logon_text
        @if (Model.unlockRegistration)
        {
@Html.Raw(string.Format(CoreLanguage.logon_text1, Html.ActionLink(CoreLanguage.register, "Register", new { returnUrl = Model.returnUrl })))
        }
    </p>    
}
<div id="errorsumm">
@Html.Raw(Model.errorOpenId)
</div>
<div class="last"></div>
<table class="separate">
    <tr>
        @if (Model.unlockSiteId)
        {
<td style="@Model.tableWidth">
@using (Html.BeginForm())
{
<div class="editor-label">
    @Html.LabelFor(m => m.UserName, Model.LabelUserName)
            </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName)
                </div>
                <div class="editor-label">
                    @Html.LabelFor(m => m.Password, CoreLanguage.Password)
                </div>
                <div class="editor-field">
                    @Html.PasswordFor(m => m.Password) @Html.ValidationMessageFor(m => m.Password)
                </div>
                <div class="editor-label">
                    @Html.CheckBoxFor(m => m.RememberMe) @Html.LabelFor(m => m.RememberMe, CoreLanguage.RememberMe)
                </div>
                <div class="button">
                    @Html.MytripButton(CoreLanguage.logon, true, "left")
                    @if (Model.unlockRegistration && Model.unlockSiteId)
                    {
@Html.MytripButton("/Account/Register?ReturnUrl=" + Model.returnUrl, CoreLanguage.register, false, "left")
                    }
                </div>

                <p>
                    <a href="/Account/ForgotPassword?_id=true&ReturnUrl=@Model.returnUrl">@CoreLanguage.forgotPassword</a>
                </p>
 
}</td>
        }
        @if (Model.unlockOpenId)
        {
<td style="@Model.tableWidth text-align: center; padding-top: 5px;">
<div>
    @Html.MytripImgInput("/images/google.png", "https://google.com/accounts/o8/id&ReturnUrl=" + Model.returnUrl, "nonameopenid")
    @Html.MytripImgInput("/images/aol.png", "http://openid.aol.com/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
    @Html.MytripImgInput("/images/yahoo.png", "https://me.yahoo.com/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
            </div>
                <div>
                    @Html.MytripImgInput("/images/myopenid.png", "https://www.myopenid.com/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
                    @Html.MytripImgInput("/images/claimid.png", "http://claimid.com/{0}/&ReturnUrl=" + Model.returnUrl, CoreLanguage.UserName, "nameopenid")
                    @Html.MytripImgInput("/images/myid.png", "http://myid.net/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
                </div>
                <div>
                    @Html.MytripImgInput("/images/openid.png", "{0}&ReturnUrl=" + Model.returnUrl, "URL (http://sitename...)", "nameopenid")
                    @Html.MytripImgInput("/images/livejournal.png", "http://{0}.livejournal.com/&ReturnUrl=" + Model.returnUrl, CoreLanguage.UserName, "nameopenid")
                    @Html.MytripImgInput("/images/wordpress.png", "http://{0}.wordpress.com/&ReturnUrl=" + Model.returnUrl, CoreLanguage.UserName, "nameopenid")
                </div>
                <div>
                    @Html.MytripImgInput("/images/verisignlabs.png", "https://pip.verisignlabs.com/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
                    @Html.MytripImgInput("/images/rambler.png", "http://rambler.ru/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
                    @Html.MytripImgInput("/images/yandex.png", "http://openid.yandex.ru/&ReturnUrl=" + Model.returnUrl, "nonameopenid")
                </div>
</td>
        }

    </tr>
</table>
<div class="window">
    <div class="modalTC">@CoreLanguage.logon</div>
    <div class="modalC">
        <span id="TitleOpenId"></span>
        <div class="editor-field">
            @Html.TextBox("op", null, new { id = "_op", style = "width:300px;" })
        </div>
        <div class="button">
            @Html.MytripButton(CoreLanguage.cancel, false, "cancel", "right") @Html.MytripButton(CoreLanguage.logon, true, "ok", "right")
        </div>
    </div>
</div>
}